<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>星座与人格特质解析</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        zodiac: '#4F46E5',    // 星座主题色：靛蓝色
                        mbti: '#EC4899',      // MBTI人格主题色：粉红色
                        neutral: {
                            100: '#F3F4F6',
                            200: '#E5E7EB',
                            300: '#D1D5DB',
                            700: '#374151',
                            800: '#1F2937',
                            900: '#111827'
                        }
                    },
                    fontFamily: {
                        inter: ['Inter', 'system-ui', 'sans-serif'],
                    },
                }
            }
        }
    </script>
    <style type="text/tailwindcss">
        @layer utilities {
            .tab-active {
                @apply border-b-2 font-medium;
            }
            .type-card {
                @apply p-4 rounded-lg cursor-pointer transition-all hover:shadow-md;
            }
            .type-card-active {
                @apply shadow-md scale-105;
            }
            .content-fade {
                animation: fadeIn 0.5s ease-out forwards;
            }
            .modal-slide-up {
                animation: slideUp 0.4s ease-out forwards;
            }
            .modal-backdrop {
                animation: fadeIn 0.3s ease-out forwards;
            }
            @keyframes fadeIn {
                from { opacity: 0; transform: translateY(10px); }
                to { opacity: 1; transform: translateY(0); }
            }
            @keyframes slideUp {
                from { transform: translateY(100%); }
                to { transform: translateY(0); }
            }
        }
    </style>
</head>
<body class="font-inter bg-neutral-100 text-neutral-800 min-h-screen">
    <!-- 导航栏 -->
    <header class="bg-white shadow-sm sticky top-0 z-50">
        <div class="container mx-auto px-4 py-4">
            <div class="flex flex-col md:flex-row items-center justify-between">
                <div class="flex items-center mb-4 md:mb-0">
                    <div class="w-10 h-10 rounded-full bg-gradient-to-r from-zodiac to-mbti flex items-center justify-center mr-3">
                        <i class="fa fa-star text-white"></i>
                    </div>
                    <h1 class="text-xl md:text-2xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-zodiac to-mbti">
                        星座与人格解析
                    </h1>
                </div>
            </div>
        </div>
    </header>

    <!-- 主要内容区 -->
    <main class="container mx-auto px-4 py-8">
        <!-- 类型选择标签页 -->
        <div class="mb-8 bg-white rounded-xl shadow-sm p-1">
            <div class="flex border-b">
                <button id="zodiacTab" class="tab-active border-zodiac text-zodiac flex-1 py-4 px-6 text-center focus:outline-none">
                    <i class="fa fa-moon-o mr-2"></i>星座
                </button>
                <button id="personalityTab" class="border-transparent text-neutral-600 flex-1 py-4 px-6 text-center focus:outline-none">
                    <i class="fa fa-user mr-2"></i>人格类型
                </button>
            </div>
        </div>

        <!-- 内容区域 -->
        <div class="space-y-8">
            <!-- 星座选择与内容区 -->
            <div id="zodiacContent" class="space-y-6">
                <!-- 星座选择器按钮 -->
                <div class="bg-white rounded-xl shadow-sm p-6">
                    <button id="openZodiacModal" class="w-full py-3 border border-neutral-200 rounded-lg flex items-center justify-center text-zodiac hover:bg-zodiac/5 transition-colors">
                        <i class="fa fa-fire mr-2"></i>
                        <span>选择星座：白羊座 (3.21-4.19)</span>
                        <i class="fa fa-chevron-down ml-2"></i>
                    </button>
                </div>

                <!-- 星座详情 - 卡片式布局 -->
                <div class="zodiac-details content-fade space-y-6">
                    <div class="bg-white rounded-xl shadow-sm overflow-hidden">
                        <div class="bg-gradient-to-r from-zodiac/90 to-zodiac p-6 md:p-8 text-white">
                            <div class="flex flex-col md:flex-row md:items-end justify-between">
                                <div>
                                    <h2 class="text-2xl md:text-3xl font-bold mb-2">白羊座 <span class="text-white/80 text-lg">(Aries)</span></h2>
                                    <p class="opacity-90"><i class="fa fa-calendar mr-1"></i> 3月21日 - 4月19日</p>
                                </div>
                                <div class="mt-4 md:mt-0 text-5xl">
                                    <i class="fa fa-fire"></i>
                                </div>
                            </div>
                        </div>

                        <div class="p-6 md:p-8 space-y-8">
                            <!-- 星座特质卡片 -->
                            <div class="bg-neutral-50 p-6 rounded-lg">
                                <h3 class="text-xl font-bold mb-4 text-zodiac">星座特质</h3>
                                <p class="mb-4 text-neutral-700">
                                    白羊座是黄道十二宫的第一个星座，象征着新生和开始。白羊座的人通常充满活力、热情洋溢，具有强烈的冒险精神和领导力。他们性格坦率直接，行事果断，喜欢接受挑战。
                                </p>
                                <p class="text-neutral-700">
                                    白羊座的人如同公羊一般，具有不屈不挠的精神和勇往直前的决心。他们对生活充满热情，总是积极主动地追求自己的目标，但有时也会显得冲动和缺乏耐心。
                                </p>
                            </div>

                            <!-- 核心特质卡片 -->
                            <div class="bg-neutral-50 p-6 rounded-lg">
                                <h3 class="text-xl font-bold mb-4 text-zodiac">核心特质</h3>
                                <div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 gap-3">
                                    <div class="bg-white p-3 rounded shadow-sm flex items-center">
                                        <i class="fa fa-check-circle text-zodiac mr-2"></i>
                                        <span>热情主动</span>
                                    </div>
                                    <div class="bg-white p-3 rounded shadow-sm flex items-center">
                                        <i class="fa fa-check-circle text-zodiac mr-2"></i>
                                        <span>勇敢果断</span>
                                    </div>
                                    <div class="bg-white p-3 rounded shadow-sm flex items-center">
                                        <i class="fa fa-check-circle text-zodiac mr-2"></i>
                                        <span>充满活力</span>
                                    </div>
                                    <div class="bg-white p-3 rounded shadow-sm flex items-center">
                                        <i class="fa fa-check-circle text-zodiac mr-2"></i>
                                        <span>富有领导力</span>
                                    </div>
                                    <div class="bg-white p-3 rounded shadow-sm flex items-center">
                                        <i class="fa fa-check-circle text-zodiac mr-2"></i>
                                        <span>冲动直接</span>
                                    </div>
                                </div>
                            </div>

                            <!-- 优点和待改进点 -->
                            <div class="grid md:grid-cols-2 gap-6">
                                <div class="bg-neutral-50 p-6 rounded-lg">
                                    <h3 class="font-bold text-lg mb-4 flex items-center">
                                        <i class="fa fa-plus-circle text-zodiac mr-2"></i>优点
                                    </h3>
                                    <ul class="space-y-3 text-neutral-700">
                                        <li class="flex items-start">
                                            <i class="fa fa-angle-right text-zodiac mt-1 mr-2"></i>
                                            <span>充满激情和活力</span>
                                        </li>
                                        <li class="flex items-start">
                                            <i class="fa fa-angle-right text-zodiac mt-1 mr-2"></i>
                                            <span>勇敢面对挑战</span>
                                        </li>
                                        <li class="flex items-start">
                                            <i class="fa fa-angle-right text-zodiac mt-1 mr-2"></i>
                                            <span>正直坦率，不虚伪</span>
                                        </li>
                                        <li class="flex items-start">
                                            <i class="fa fa-angle-right text-zodiac mt-1 mr-2"></i>
                                            <span>富有领导力和开创性</span>
                                        </li>
                                    </ul>
                                </div>
                                <div class="bg-neutral-50 p-6 rounded-lg">
                                    <h3 class="font-bold text-lg mb-4 flex items-center">
                                        <i class="fa fa-minus-circle text-zodiac mr-2"></i>待改进点
                                    </h3>
                                    <ul class="space-y-3 text-neutral-700">
                                        <li class="flex items-start">
                                            <i class="fa fa-angle-right text-zodiac mt-1 mr-2"></i>
                                            <span>有时过于冲动急躁</span>
                                        </li>
                                        <li class="flex items-start">
                                            <i class="fa fa-angle-right text-zodiac mt-1 mr-2"></i>
                                            <span>缺乏耐心，容易不耐烦</span>
                                        </li>
                                        <li class="flex items-start">
                                            <i class="fa fa-angle-right text-zodiac mt-1 mr-2"></i>
                                            <span>可能显得固执己见</span>
                                        </li>
                                        <li class="flex items-start">
                                            <i class="fa fa-angle-right text-zodiac mt-1 mr-2"></i>
                                            <span>竞争心强，不愿服输</span>
                                        </li>
                                    </ul>
                                </div>
                            </div>

                            <!-- 爱情与人际关系卡片 -->
                            <div class="bg-neutral-50 p-6 rounded-lg">
                                <h3 class="font-bold text-lg mb-4">爱情与人际关系</h3>
                                <p class="text-neutral-700">
                                    在爱情中，白羊座通常热情直接，敢于表达自己的感情。他们喜欢主动追求，享受爱情中的激情和挑战。作为伴侣，他们忠诚且充满活力，但有时会显得占有欲强或缺乏耐心。
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 人格类型选择与内容区 (默认隐藏) -->
            <div id="personalityContent" class="space-y-6 hidden">
                <!-- 人格类型选择器按钮 -->
                <div class="bg-white rounded-xl shadow-sm p-6">
                    <button id="openPersonalityModal" class="w-full py-3 border border-neutral-200 rounded-lg flex items-center justify-center text-mbti hover:bg-mbti/5 transition-colors">
                        <i class="fa fa-shield mr-2"></i>
                        <span>选择人格类型：ISTJ (物流师)</span>
                        <i class="fa fa-chevron-down ml-2"></i>
                    </button>
                </div>

                <!-- 人格类型详情 - 卡片式布局 -->
                <div class="personality-details content-fade space-y-6">
                    <div class="bg-white rounded-xl shadow-sm overflow-hidden">
                        <div class="bg-gradient-to-r from-mbti/90 to-mbti p-6 md:p-8 text-white">
                            <div class="flex flex-col md:flex-row md:items-end justify-between">
                                <div>
                                    <h2 class="text-2xl md:text-3xl font-bold mb-2">ISTJ <span class="text-white/80 text-lg">物流师</span></h2>
                                    <p class="opacity-90"><i class="fa fa-balance-scale mr-1"></i> 内倾-感觉-思考-判断</p>
                                </div>
                                <div class="mt-4 md:mt-0 text-5xl">
                                    <i class="fa fa-shield"></i>
                                </div>
                            </div>
                        </div>

                        <div class="p-6 md:p-8 space-y-8">
                            <!-- 人格特质卡片 -->
                            <div class="bg-neutral-50 p-6 rounded-lg">
                                <h3 class="text-xl font-bold mb-4 text-mbti">人格特质</h3>
                                <p class="mb-4 text-neutral-700">
                                    ISTJ型人格被称为"物流师"，他们是实用主义者，重视传统、规则和制度，做事严谨认真，是天生的组织者和执行者。他们相信通过努力工作和责任感可以实现目标，对自己和他人都有较高的要求。
                                </p>
                                <p class="text-neutral-700">
                                    作为感觉型(S)个体，他们关注具体事实和细节，而非抽象概念；作为思考型(T)决策者，他们依赖逻辑分析而非情感；作为判断型(J)的人，他们喜欢计划和确定性，厌恶混乱和意外。
                                </p>
                            </div>

                            <!-- 核心特质卡片 -->
                            <div class="bg-neutral-50 p-6 rounded-lg">
                                <h3 class="text-xl font-bold mb-4 text-mbti">核心特质</h3>
                                <div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 gap-3">
                                    <div class="bg-white p-3 rounded shadow-sm flex items-center">
                                        <i class="fa fa-check-circle text-mbti mr-2"></i>
                                        <span>可靠务实</span>
                                    </div>
                                    <div class="bg-white p-3 rounded shadow-sm flex items-center">
                                        <i class="fa fa-check-circle text-mbti mr-2"></i>
                                        <span>严谨细致</span>
                                    </div>
                                    <div class="bg-white p-3 rounded shadow-sm flex items-center">
                                        <i class="fa fa-check-circle text-mbti mr-2"></i>
                                        <span>责任感强</span>
                                    </div>
                                    <div class="bg-white p-3 rounded shadow-sm flex items-center">
                                        <i class="fa fa-check-circle text-mbti mr-2"></i>
                                        <span>有耐心</span>
                                    </div>
                                    <div class="bg-white p-3 rounded shadow-sm flex items-center">
                                        <i class="fa fa-check-circle text-mbti mr-2"></i>
                                        <span>重视规则</span>
                                    </div>
                                </div>
                            </div>

                            <!-- 优势和待发展点 -->
                            <div class="grid md:grid-cols-2 gap-6">
                                <div class="bg-neutral-50 p-6 rounded-lg">
                                    <h3 class="font-bold text-lg mb-4 flex items-center">
                                        <i class="fa fa-plus-circle text-mbti mr-2"></i>优势
                                    </h3>
                                    <ul class="space-y-3 text-neutral-700">
                                        <li class="flex items-start">
                                            <i class="fa fa-angle-right text-mbti mt-1 mr-2"></i>
                                            <span>高度可靠，信守承诺</span>
                                        </li>
                                        <li class="flex items-start">
                                            <i class="fa fa-angle-right text-mbti mt-1 mr-2"></i>
                                            <span>注重细节，很少出错</span>
                                        </li>
                                        <li class="flex items-start">
                                            <i class="fa fa-angle-right text-mbti mt-1 mr-2"></i>
                                            <span>有强烈的责任感</span>
                                        </li>
                                        <li class="flex items-start">
                                            <i class="fa fa-angle-right text-mbti mt-1 mr-2"></i>
                                            <span>善于制定和执行计划</span>
                                        </li>
                                    </ul>
                                </div>
                                <div class="bg-neutral-50 p-6 rounded-lg">
                                    <h3 class="font-bold text-lg mb-4 flex items-center">
                                        <i class="fa fa-minus-circle text-mbti mr-2"></i>待发展点
                                    </h3>
                                    <ul class="space-y-3 text-neutral-700">
                                        <li class="flex items-start">
                                            <i class="fa fa-angle-right text-mbti mt-1 mr-2"></i>
                                            <span>可能过于固执，难以适应变化</span>
                                        </li>
                                        <li class="flex items-start">
                                            <i class="fa fa-angle-right text-mbti mt-1 mr-2"></i>
                                            <span>有时过于关注规则而缺乏灵活性</span>
                                        </li>
                                        <li class="flex items-start">
                                            <i class="fa fa-angle-right text-mbti mt-1 mr-2"></i>
                                            <span>可能低估创新想法的价值</span>
                                        </li>
                                        <li class="flex items-start">
                                            <i class="fa fa-angle-right text-mbti mt-1 mr-2"></i>
                                            <span>不善于表达情感，显得冷漠</span>
                                        </li>
                                    </ul>
                                </div>
                            </div>

                            <!-- 适合的职业方向卡片 -->
                            <div class="bg-neutral-50 p-6 rounded-lg">
                                <h3 class="font-bold text-lg mb-4">适合的职业方向</h3>
                                <div class="flex flex-wrap gap-3">
                                    <span class="px-3 py-1 bg-mbti/10 text-mbti rounded-full text-sm">会计/财务</span>
                                    <span class="px-3 py-1 bg-mbti/10 text-mbti rounded-full text-sm">行政管理人员</span>
                                    <span class="px-3 py-1 bg-mbti/10 text-mbti rounded-full text-sm">法律工作者</span>
                                    <span class="px-3 py-1 bg-mbti/10 text-mbti rounded-full text-sm">医疗保健</span>
                                    <span class="px-3 py-1 bg-mbti/10 text-mbti rounded-full text-sm">工程技术</span>
                                    <span class="px-3 py-1 bg-mbti/10 text-mbti rounded-full text-sm">教育工作者</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </main>

    <!-- 页脚 -->
    <footer class="bg-neutral-800 text-white py-10 mt-12">
        <div class="container mx-auto px-4">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="mb-6 md:mb-0 text-center md:text-left">
                    <div class="flex items-center justify-center md:justify-start space-x-2 mb-2">
                        <i class="fa fa-star text-zodiac"></i>
                        <span class="font-bold">星座与人格解析</span>
                    </div>
                    <p class="text-neutral-400 text-sm">探索人类性格与行为的多样性</p>
                </div>
                
                <div class="text-neutral-400 text-sm">
                    <p>© 2023 星座与人格解析 | 仅供参考</p>
                </div>
            </div>
        </div>
    </footer>

    <!-- 星座选择模态框 -->
    <div id="zodiacModal" class="fixed inset-0 z-50 hidden">
        <div class="modal-backdrop absolute inset-0 bg-black/50" id="zodiacModalBackdrop"></div>
        <div class="modal-slide-up absolute bottom-0 left-0 right-0 bg-white rounded-t-2xl max-h-[85vh] overflow-y-auto">
            <div class="p-6 border-b">
                <div class="flex justify-between items-center">
                    <h3 class="text-xl font-bold text-zodiac">选择星座</h3>
                    <button id="closeZodiacModal" class="text-neutral-500 hover:text-neutral-800">
                        <i class="fa fa-times text-xl"></i>
                    </button>
                </div>
            </div>
            <div class="p-6">
                <div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-3">
                    <div class="type-card type-card-active bg-zodiac/5 border border-zodiac/20 text-zodiac" data-zodiac="aries">
                        <div class="text-center">
                            <i class="fa fa-fire text-xl mb-1"></i>
                            <p>白羊座</p>
                            <p class="text-xs text-zodiac/70">3.21-4.19</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-zodiac="taurus">
                        <div class="text-center">
                            <i class="fa fa-bull text-xl mb-1"></i>
                            <p>金牛座</p>
                            <p class="text-xs text-neutral-500">4.20-5.20</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-zodiac="gemini">
                        <div class="text-center">
                            <i class="fa fa-male text-xl mb-1"></i>
                            <p>双子座</p>
                            <p class="text-xs text-neutral-500">5.21-6.21</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-zodiac="cancer">
                        <div class="text-center">
                            <i class="fa fa-moon-o text-xl mb-1"></i>
                            <p>巨蟹座</p>
                            <p class="text-xs text-neutral-500">6.22-7.22</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-zodiac="leo">
                        <div class="text-center">
                            <i class="fa fa-sun-o text-xl mb-1"></i>
                            <p>狮子座</p>
                            <p class="text-xs text-neutral-500">7.23-8.22</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-zodiac="virgo">
                        <div class="text-center">
                            <i class="fa fa-female text-xl mb-1"></i>
                            <p>处女座</p>
                            <p class="text-xs text-neutral-500">8.23-9.22</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-zodiac="libra">
                        <div class="text-center">
                            <i class="fa fa-balance-scale text-xl mb-1"></i>
                            <p>天秤座</p>
                            <p class="text-xs text-neutral-500">9.23-10.23</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-zodiac="scorpio">
                        <div class="text-center">
                            <i class="fa fa-scissors text-xl mb-1"></i>
                            <p>天蝎座</p>
                            <p class="text-xs text-neutral-500">10.24-11.22</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-zodiac="sagittarius">
                        <div class="text-center">
                            <i class="fa fa-arrow-up text-xl mb-1"></i>
                            <p>射手座</p>
                            <p class="text-xs text-neutral-500">11.23-12.21</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-zodiac="capricorn">
                        <div class="text-center">
                            <i class="fa fa-mountain text-xl mb-1"></i>
                            <p>摩羯座</p>
                            <p class="text-xs text-neutral-500">12.22-1.19</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-zodiac="aquarius">
                        <div class="text-center">
                            <i class="fa fa-tint text-xl mb-1"></i>
                            <p>水瓶座</p>
                            <p class="text-xs text-neutral-500">1.20-2.18</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-zodiac="pisces">
                        <div class="text-center">
                            <i class="fa fa-anchor text-xl mb-1"></i>
                            <p>双鱼座</p>
                            <p class="text-xs text-neutral-500">2.19-3.20</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 人格类型选择模态框 -->
    <div id="personalityModal" class="fixed inset-0 z-50 hidden">
        <div class="modal-backdrop absolute inset-0 bg-black/50" id="personalityModalBackdrop"></div>
        <div class="modal-slide-up absolute bottom-0 left-0 right-0 bg-white rounded-t-2xl max-h-[85vh] overflow-y-auto">
            <div class="p-6 border-b">
                <div class="flex justify-between items-center">
                    <h3 class="text-xl font-bold text-mbti">选择人格类型</h3>
                    <button id="closePersonalityModal" class="text-neutral-500 hover:text-neutral-800">
                        <i class="fa fa-times text-xl"></i>
                    </button>
                </div>
            </div>
            <div class="p-6">
                <div class="grid grid-cols-2 sm:grid-cols-4 gap-3">
                    <div class="type-card type-card-active bg-mbti/5 border border-mbti/20 text-mbti" data-personality="istj">
                        <div class="text-center">
                            <p class="font-medium">ISTJ</p>
                            <p class="text-xs">物流师</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-personality="isfj">
                        <div class="text-center">
                            <p class="font-medium">ISFJ</p>
                            <p class="text-xs">守卫者</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-personality="infj">
                        <div class="text-center">
                            <p class="font-medium">INFJ</p>
                            <p class="text-xs">咨询师</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-personality="intj">
                        <div class="text-center">
                            <p class="font-medium">INTJ</p>
                            <p class="text-xs">策划者</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-personality="istp">
                        <div class="text-center">
                            <p class="font-medium">ISTP</p>
                            <p class="text-xs">手艺人</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-personality="isfp">
                        <div class="text-center">
                            <p class="font-medium">ISFP</p>
                            <p class="text-xs">艺术家</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-personality="infp">
                        <div class="text-center">
                            <p class="font-medium">INFP</p>
                            <p class="text-xs">调停者</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-personality="intp">
                        <div class="text-center">
                            <p class="font-medium">INTP</p>
                            <p class="text-xs">逻辑学家</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-personality="estp">
                        <div class="text-center">
                            <p class="font-medium">ESTP</p>
                            <p class="text-xs">创业者</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-personality="esfp">
                        <div class="text-center">
                            <p class="font-medium">ESFP</p>
                            <p class="text-xs">表演者</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-personality="enfp">
                        <div class="text-center">
                            <p class="font-medium">ENFP</p>
                            <p class="text-xs">追梦人</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-personality="entp">
                        <div class="text-center">
                            <p class="font-medium">ENTP</p>
                            <p class="text-xs">辩论家</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-personality="estj">
                        <div class="text-center">
                            <p class="font-medium">ESTJ</p>
                            <p class="text-xs">总经理</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-personality="esfj">
                        <div class="text-center">
                            <p class="font-medium">ESFJ</p>
                            <p class="text-xs">执政官</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-personality="enfj">
                        <div class="text-center">
                            <p class="font-medium">ENFJ</p>
                            <p class="text-xs">教育家</p>
                        </div>
                    </div>
                    <div class="type-card bg-white border border-neutral-200" data-personality="entj">
                        <div class="text-center">
                            <p class="font-medium">ENTJ</p>
                            <p class="text-xs">指挥官</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        // 标签页切换功能
        const zodiacTab = document.getElementById('zodiacTab');
        const personalityTab = document.getElementById('personalityTab');
        const zodiacContent = document.getElementById('zodiacContent');
        const personalityContent = document.getElementById('personalityContent');
        
        zodiacTab.addEventListener('click', () => {
            // 更新标签样式
            zodiacTab.classList.remove('border-transparent', 'text-neutral-600');
            zodiacTab.classList.add('tab-active', 'border-zodiac', 'text-zodiac');
            
            personalityTab.classList.remove('tab-active', 'border-mbti', 'text-mbti');
            personalityTab.classList.add('border-transparent', 'text-neutral-600');
            
            // 切换内容显示
            zodiacContent.classList.remove('hidden');
            personalityContent.classList.add('hidden');
        });
        
        personalityTab.addEventListener('click', () => {
            // 更新标签样式
            personalityTab.classList.remove('border-transparent', 'text-neutral-600');
            personalityTab.classList.add('tab-active', 'border-mbti', 'text-mbti');
            
            zodiacTab.classList.remove('tab-active', 'border-zodiac', 'text-zodiac');
            zodiacTab.classList.add('border-transparent', 'text-neutral-600');
            
            // 切换内容显示
            personalityContent.classList.remove('hidden');
            zodiacContent.classList.add('hidden');
        });

        // 星座模态框控制
        const zodiacModal = document.getElementById('zodiacModal');
        const openZodiacModal = document.getElementById('openZodiacModal');
        const closeZodiacModal = document.getElementById('closeZodiacModal');
        const zodiacModalBackdrop = document.getElementById('zodiacModalBackdrop');
        const zodiacSelectButton = document.querySelector('#zodiacContent button');
        
        openZodiacModal.addEventListener('click', () => {
            zodiacModal.classList.remove('hidden');
            document.body.style.overflow = 'hidden'; // 防止背景滚动
        });
        
        function closeZodiac() {
            zodiacModal.classList.add('hidden');
            document.body.style.overflow = ''; // 恢复滚动
        }
        
        closeZodiacModal.addEventListener('click', closeZodiac);
        zodiacModalBackdrop.addEventListener('click', closeZodiac);
        
        // 人格类型模态框控制
        const personalityModal = document.getElementById('personalityModal');
        const openPersonalityModal = document.getElementById('openPersonalityModal');
        const closePersonalityModal = document.getElementById('closePersonalityModal');
        const personalityModalBackdrop = document.getElementById('personalityModalBackdrop');
        const personalitySelectButton = document.querySelector('#personalityContent button');
        
        openPersonalityModal.addEventListener('click', () => {
            personalityModal.classList.remove('hidden');
            document.body.style.overflow = 'hidden'; // 防止背景滚动
        });
        
        function closePersonality() {
            personalityModal.classList.add('hidden');
            document.body.style.overflow = ''; // 恢复滚动
        }
        
        closePersonalityModal.addEventListener('click', closePersonality);
        personalityModalBackdrop.addEventListener('click', closePersonality);
        
        // 星座选择功能
        const zodiacItems = document.querySelectorAll('[data-zodiac]');
        zodiacItems.forEach(item => {
            item.addEventListener('click', () => {
                // 移除所有选中状态
                zodiacItems.forEach(i => {
                    i.classList.remove('type-card-active', 'bg-zodiac/5', 'border-zodiac/20', 'text-zodiac');
                    i.classList.add('bg-white', 'border-neutral-200');
                });
                
                // 设置当前选中状态
                item.classList.remove('bg-white', 'border-neutral-200');
                item.classList.add('type-card-active', 'bg-zodiac/5', 'border-zodiac/20', 'text-zodiac');
                
                // 更新选择按钮文本
                const zodiacName = item.querySelector('p:first-of-type').textContent;
                const zodiacDate = item.querySelector('p:last-of-type').textContent;
                const zodiacIcon = item.querySelector('i').className;
                zodiacSelectButton.innerHTML = `<i class="${zodiacIcon} mr-2"></i><span>选择星座：${zodiacName} (${zodiacDate})</span><i class="fa fa-chevron-down ml-2"></i>`;
                
                // 加载对应星座数据并关闭模态框
                const zodiac = item.getAttribute('data-zodiac');
                loadZodiacData(zodiac);
                closeZodiac();
            });
        });
        
        // 人格类型选择功能
        const personalityItems = document.querySelectorAll('[data-personality]');
        personalityItems.forEach(item => {
            item.addEventListener('click', () => {
                // 移除所有选中状态
                personalityItems.forEach(i => {
                    i.classList.remove('type-card-active', 'bg-mbti/5', 'border-mbti/20', 'text-mbti');
                    i.classList.add('bg-white', 'border-neutral-200');
                });
                
                // 设置当前选中状态
                item.classList.remove('bg-white', 'border-neutral-200');
                item.classList.add('type-card-active', 'bg-mbti/5', 'border-mbti/20', 'text-mbti');
                
                // 更新选择按钮文本
                const personalityCode = item.querySelector('p:first-of-type').textContent;
                const personalityName = item.querySelector('p:last-of-type').textContent;
                personalitySelectButton.innerHTML = `<i class="fa fa-shield mr-2"></i><span>选择人格类型：${personalityCode} (${personalityName})</span><i class="fa fa-chevron-down ml-2"></i>`;
                
                // 加载对应人格类型数据并关闭模态框
                const personality = item.getAttribute('data-personality');
                loadPersonalityData(personality);
                closePersonality();
            });
        });
        
        // 加载星座数据的函数
        function loadZodiacData(zodiac) {
            console.log('加载星座数据:', zodiac);
            
            // 添加加载动画效果
            const detailsContainer = document.querySelector('.zodiac-details');
            detailsContainer.style.opacity = '0';
            
            setTimeout(() => {
                // 这里可以根据实际数据更新内容
                detailsContainer.style.opacity = '1';
            }, 300);
        }
        
        // 加载人格类型数据的函数
        function loadPersonalityData(personality) {
            console.log('加载人格类型数据:', personality);
            
            // 添加加载动画效果
            const detailsContainer = document.querySelector('.personality-details');
            detailsContainer.style.opacity = '0';
            
            setTimeout(() => {
                // 这里可以根据实际数据更新内容
                detailsContainer.style.opacity = '1';
            }, 300);
        }
    </script>
</body>
</html>
